<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>Using Macros In Commands</title>

<STYLE type="text/css">
<!--
        .PageTitle { font-family: verdana,arial,serif; font-size: 12pt; font-weight: bold; }
        .Default { font-family: verdana,arial,serif; font-size: 8pt;  }
		
		TH.Macros { font-family: verdana,arial,serif; font-size: 9pt; font-weight: bold; background-color: #cbcbcb; }
		.MacroName { font-family: verdana,arial,serif; font-size: 8pt; font-weight: bold; }
		.MacroDescription { font-family: verdana,arial,serif; font-size: 7pt; }
		.MacroNo { font-family: verdana,arial,serif; font-size: 8pt; background-color: white; }
		.MacroYes { font-family: verdana,arial,serif; font-size: 8pt; font-weight: bold; background-color: #00ff00; }
		.MacroType { font-family: verdana,arial,serif; font-size: 8pt; font-weight: bold; background-color: #cbcbcb; }
		
-->      
</STYLE>

</head>

<body bgcolor="#FFFFFF" text="black" class="Default">

<p>
<div align="center">
<h2 class="PageTitle">Using Macros In Commands</h2>
</div>
</p>
<hr>

<p>
<strong><u>Macros</u></strong>
</p>

<p>
One of the features available in Nagios is the ability to use macros in command defintions.  Immediately prior to the execution of a command, Nagios will replace all macros in the command with their corresponding values.  This allows you to define a few generic commands to handle all your needs.  
</p>

<p>
<strong><u>Macro Substitution</u></strong>
</p>

<p>
Before any commands (host and service checks, notifications, event handlers, etc.) are executed, Nagios will replace any macros it finds in the command definition with their corresponding values.
</p>

<p>
When you use host and service macros in command definitions, they refer to values for the host or service for which the command is being run.  Let's try an example.  Assuming we are using a host definition and a <i>check_ping</i> command defined like this:
</p>

<p>
<pre>
define host{
	host_name		linuxbox
	address		192.168.1.2
	check_command	check_ping
	...
	}
	
define command{
	command_name    check_ping
	command_line    /usr/local/nagios/libexec/check_ping -H $HOSTADDRESS$ -w 100.0,90% -c 200.0,60%
	}
</pre>
</p>

<p>
the expanded/final command line to be executed for the host's check command would look like this:
</p>

<p>
<pre>
	/usr/local/nagios/libexec/check_ping -H 192.168.1.2 -w 100.0,90% -c 200.0,60%
</pre>
</p>

<p>
You can pass arguments to commands as well, which is quite handy if you'd like to keep your command definitions rather generic.  Arguments are specified in the object (i.e. host or service) definition, by seperating them from the command name with exclamation points (!) like so:
</p>

<p>
<pre>
define service{
	host_name		linuxbox
	service_description	PING
	...
	check_command	check_ping!200.0,80%!400.0,40%
	...
	}
</pre>
</p>

<p>
In the example above, the service check command has two arguments (which can be referenced with <a href="#arg">$ARGn$</a> macros).  The $ARG1$ macro will be "200.0,80%" and $ARG2$ will be "400.0,40%" (both without quotes).  Assuming we are using the host definition given earlier and a <i>check_ping</i> command defined like this:
</p>

<p>
<pre>
define command{
	command_name    check_ping
	command_line    /usr/local/nagios/libexec/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$
	}
</pre>
</p>

<p>
the expanded/final command line to be executed for the service's check command would look like this:
</p>

<p>
<pre>
	/usr/local/nagios/libexec/check_ping -H 192.168.1.2 -w 200.0,80% -c 400.0,40%
</pre>
</p>

<p>
<strong><u>On-Demand Macros</u></strong>
</p>

<p>
Normally when you use host and service macros in command definitions, they refer to values for the host or service for which the command is being run.  For instance, if a host check command is being executed for a host named "linuxbox", all the host macros listed in the table below will refer to values for that host ("linuxbox").
</p>

<p>
If you would like to reference values for another host or service in a command (for which the command is not being run), you can use what are called "on-demand" macros.  On-demand macros look like normal macros, except for the fact that they contain an identifier for the host or service from which they should get their value.  Here's the basic format for on-demand macros:
</p>

<p>
<ul>
<li>$HOSTMACRO:<i>host_name</i>$</li>
<li>$SERVICEMACRO:<i>host_name</i>:<i>service_description</i>$</li>
</ul>
</p>

<p>
Note that the macro name is seperated from the host or service identifier by a colon (:).  For on-demand service macros, the service identifier consists of both a host name and a service description - these are seperated by a colon (:) as well.
</p>

<p>
Examples of on-demand host and service macros follow:
</p>

<p>
<pre>
$HOSTDOWNTIME:myhost$
$SERVICESTATEID:novellserver:DS Database$
</pre>
</p>


<p>
<strong><u>Macro Cleansing</u></strong>
</p>

<p>
Some macros are stripped of potentially dangerous shell metacharacters before being substituted into commands to be executed.  Which characters are stripped from the macros depends on the setting of the <a href="configmain.html#illegal_macro_output_chars">illegal_macro_output_chars</a> directive.  The following macros are stripped of potentially dangerous characters:
</p>

<p>
<ol>
<li><a href="#hostoutput">$HOSTOUTPUT$</a>
<li><a href="#hostperfdata">$HOSTPERFDATA$</a>
<li><a href="#hostackauthor">$HOSTACKAUTHOR$</a>
<li><a href="#hostackcomment">$HOSTACKCOMMENT$</a>
<li><a href="#serviceoutput">$SERVICEOUTPUT$</a>
<li><a href="#serviceperfdata">$SERVICEPERFDATA$</a>
<li><a href="#serviceackauthor">$SERVICEACKAUTHOR$</a>
<li><a href="#serviceackcomment">$SERVICEACKCOMMENT$</a>
</ol>
</p>

<p>
<strong><u>Macros as Environment Variables</u></strong>
</p>

<p>
Starting with Nagios 2.0, most macros have been made available as environment variables.  This means that scripts that are run from Nagios (i.e. service and host check commands, notification commands, etc.) can reference these macros directly as standard environment variables.  For purposes of security and sanity, <a href="#user">$USERn$</a> and "on-demand" host and service macros are not made available as environment variables.  Environment variables that contain macros are named the same as their corresponding macro names (listed below), with "NAGIOS_" prepended to their names.  For example, the <a href="#hostoutput">$HOSTNAME$</a> macro would be available as an environment variable named "NAGIOS_HOSTNAME".
</p>


<p>
<strong><u>Macro Validity</u></strong>
</p>

<p>
Although macros can be used in all commands you define, not all macros may be "valid" in a particular type of command.  For example, some macros may only be valid during service notification commands, whereas other may only be valid during host check commands.  There are ten types of commands that Nagios recognizes and treats differently.  They are as follows:
</p>
<p>
<ol>
<li>Service checks
<li>Service notifications
<li>Host checks
<li>Host notifications
<li>Service <a href="eventhandlers.html">event handlers</a> and/or a global service event handler
<li>Host <a href="eventhandlers.html">event handlers</a> and/or a global host event handler
<li><a href="configmain.html#ocsp_command">OCSP</a> command
<li><a href="configmain.html#ochp_command">OCHP</a> command
<li>Service <a href="perfdata.html">performance data</a> commands
<li>Host <a href="perfdata.html">performance data</a> commands
</ol>
</p>

<p>
The tables below list all macros currently available in Nagios, along with a brief description of each and the types of commands in which they are valid.  If a macro is used in a command in which it is invalid, it is replaced with an empty string. It should be noted that macros consist of all uppercase characters and are enclosed in <b>$</b> characters.
</p>

<p>
<strong><u>Macro Availability Chart</u></strong>
</p>

<p align=left>
<b>Legend:</b>
<table border="1" cellspacing="0" cellpadding="5" class="Default">
<tr><td class="MacroNo">No</td><td>The macro is not available</td></tr>
<tr><td class="MacroYes">Yes</td><td>The macro is available</td></tr>
</table>
</p>

<p>
<div align="center">
<table border="1" cellspacing="0" cellpadding="5">
<tr class="Macros">
<th class="Macros">Macro Name</td>
<th class="Macros">Service Checks</td>
<th class="Macros">Service Notifications</td>
<th class="Macros">Host Checks</td>
<th class="Macros">Host Notifications</td>
<th class="Macros">Service Event Handlers, Global Service Event Handler, <a href="configmain.html#ocsp_command">OCSP</a> Command</td>
<th class="Macros">Host Event Handlers, Global Host Event Handler, <a href="configmain.html#ochp_command">OCHP</a> Command</td>
<th class="Macros">Service Performance Data Commands</td>
<th class="Macros">Host Performance Data Commands</td>
</tr>
<tr>
<td colspan='9' class='MacroType'>Host Macros: <a href="#note3"><sup>3</sup></a></td>
</tr>
<tr>
<td class='MacroName'><a href="#hostname">$HOSTNAME$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#hostalias">$HOSTALIAS$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#hostaddress">$HOSTADDRESS$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#hoststate">$HOSTSTATE$</a></a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note1"><sup>1</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#hoststateid">$HOSTSTATEID$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note1"><sup>1</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#hoststatetype">$HOSTSTATETYPE$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note1"><sup>1</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#hostattempt">$HOSTATTEMPT$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#hostlatency">$HOSTLATENCY$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#hostexecutiontime">$HOSTEXECUTIONTIME$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note1"><sup>1</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#hostduration">$HOSTDURATION$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#hostdurationsec">$HOSTDURATIONSEC$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#hostdowntime">$HOSTDOWNTIME$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#hostpercentchange">$HOSTPERCENTCHANGE$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#hostgroupname">$HOSTGROUPNAME$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#hostgroupalias">$HOSTGROUPALIAS$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#lasthostcheck">$LASTHOSTCHECK$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#lasthoststatechange">$LASTHOSTSTATECHANGE$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#lasthostup">$LASTHOSTUP$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#lasthostdown">$LASTHOSTDOWN$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#lasthostunreachable">$LASTHOSTUNREACHABLE$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#hostoutput">$HOSTOUTPUT$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note1"><sup>1</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#hostperfdata">$HOSTPERFDATA$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note1"><sup>1</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#hostcheckcommand">$HOSTCHECKCOMMAND$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#hostackauthor">$HOSTACKAUTHOR$</a></td>
<td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#hostackcomment">$HOSTACKCOMMENT$</a></td>
<td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#hostactionurl">$HOSTACTIONURL$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#hostnotesurl">$HOSTNOTESURL$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#hostnotes">$HOSTNOTES$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td colspan='9' class='MacroType'>Service Macros:</td>
</tr>
<tr>
<td class='MacroName'><a href="#servicedesc">$SERVICEDESC$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#servicestate">$SERVICESTATE$</a></td>
<td class="MacroYes">Yes <a href="#note2"><sup>2</sup></a></td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#servicestateid">$SERVICESTATEID$</a></td>
<td class="MacroYes">Yes <a href="#note2"><sup>2</sup></a></td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#servicestatetype">$SERVICESTATETYPE$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#serviceattempt">$SERVICEATTEMPT$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#servicelatency">$SERVICELATENCY$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#serviceexecutiontime">$SERVICEEXECUTIONTIME$</a></td>
<td class="MacroYes">Yes <a href="#note2"><sup>2</sup></a></td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#serviceduration">$SERVICEDURATION$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#servicedurationsec">$SERVICEDURATIONSEC$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#servicedowntime">$SERVICEDOWNTIME$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#servicepercentchange">$SERVICEPERCENTCHANGE$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#servicegroupname">$SERVICEGROUPNAME$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#servicegroupalias">$SERVICEGROUPALIAS$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#lastservicecheck">$LASTSERVICECHECK$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#lastservicestatechange">$LASTSERVICESTATECHANGE$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#lastserviceok">$LASTSERVICEOK$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#lastservicewarning">$LASTSERVICEWARNING$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#lastserviceunknown">$LASTSERVICEUNKNOWN$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#lastservicecritical">$LASTSERVICECRITICAL$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#serviceoutput">$SERVICEOUTPUT$</a></td>
<td class="MacroYes">Yes <a href="#note2"><sup>2</sup></a></td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#serviceperfdata">$SERVICEPERFDATA$</a></td>
<td class="MacroYes">Yes <a href="#note2"><sup>2</sup></a></td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#servicecheckcommand">$SERVICECHECKCOMMAND$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#serviceackauthor">$SERVICEACKAUTHOR$</a></td>
<td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#serviceackcomment">$SERVICEACKCOMMENT$</a></td>
<td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#serviceactionurl">$SERVICEACTIONURL$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#servicenotesurl">$SERVICENOTESURL$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#servicenotes">$SERVICENOTES$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td>
</tr>
<tr>
<td colspan='9' class='MacroType'>Summary Macros:</td>
</tr>
<tr>
<td class='MacroName'><a href="#totalhostsup">$TOTALHOSTSUP$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#totalhostsdown">$TOTALHOSTSDOWN$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#totalhostsunreachable">$TOTALHOSTSUNREACHABLE$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#totalhostsdownunhandled">$TOTALHOSTSDOWNUNHANDLED$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#totalhostsunreachableunhandled">$TOTALHOSTSUNREACHABLEUNHANDLED$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#totalhostproblems">$TOTALHOSTPROBLEMS$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#totalhostproblemsunhandled">$TOTALHOSTPROBLEMSUNHANDLED$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#totalservicesok">$TOTALSERVICESOK$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#totalserviceswarning">$TOTALSERVICESWARNING$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#totalservicescritical">$TOTALSERVICESCRITICAL$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#totalservicesunknown">$TOTALSERVICESUNKNOWN$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#totalserviceswarningunhandled">$TOTALSERVICESWARNINGUNHANDLED$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#totalservicescriticalunhandled">$TOTALSERVICESCRITICALUNHANDLED$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#totalservicesunknownunhandled">$TOTALSERVICESUNKNOWNUNHANDLED$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#totalserviceproblems">$TOTALSERVICEPROBLEMS$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#totalserviceproblemsunhandled">$TOTALSERVICEPROBLEMSUNHANDLED$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes <a href="#note4"><sup>4</sup></a></td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td colspan='9' class='MacroType'>Notification Macros:</td>
</tr>
<tr>
<td class='MacroName'><a href="#notificationtype">$NOTIFICATIONTYPE$</a></td>
<td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#notificationnumber">$NOTIFICATIONNUMBER$</a></td>
<td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td>
</tr>
<tr>
<td colspan='9' class='MacroType'>Contact Macros:</td>
</tr>
<tr>
<td class='MacroName'><a href="#contactname">$CONTACTNAME$</a></td>
<td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#contactalias">$CONTACTALIAS$</a></td>
<td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#contactemail">$CONTACTEMAIL$</a></td>
<td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#contactpager">$CONTACTPAGER$</a></td>
<td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td>
</tr>
<tr>
<td class='MacroName'><a href="#contactaddress">$CONTACTADDRESSn$</a></td>
<td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroYes">Yes</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td><td class="MacroNo">No</td>
</tr>
<tr>
<td colspan='9' class='MacroType'>Date Macros:</td>
</tr>
<tr>
<td class='MacroName'><a href="#longdatetime">$LONGDATETIME$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#shortdatetime">$SHORTDATETIME$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#date">$DATE$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#time">$TIME$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#timet">$TIMET$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td colspan='9' class='MacroType'>File Macros:</td>
</tr>
<tr>
<td class='MacroName'><a href="#mainconfigfile">$MAINCONFIGFILE$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#statusdatafile">$STATUSDATAFILE$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#commentdatafile">$COMMENTDATAFILE$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#downtimedatafile">$DOWNTIMEDATAFILE$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#retentiondatafile">$RETENTIONDATAFILE$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#objectcachefile">$OBJECTCACHEFILE$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#tempfile">$TEMPFILE$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#logfile">$LOGFILE$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#resourcefile">$RESOURCEFILE$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#commandfile">$COMMANDFILE$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#hostperfdatafile">$HOSTPERFDATAFILE$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#serviceperfdatafile">$SERVICEPERFDATAFILE$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td colspan='9' class='MacroType'>Misc Macros:</td>
</tr>
<tr>
<td class='MacroName'><a href="#processstarttime">$PROCESSSTARTTIME$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#adminemail">$ADMINEMAIL$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#adminpager">$ADMINPAGER$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#arg">$ARGn$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>
<tr>
<td class='MacroName'><a href="#user">$USERn$</a></td>
<td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td><td class="MacroYes">Yes</td>
</tr>

</table>
</div>
</p>


<p>
<strong><u>Macro Descriptions</u></strong>
</p>

<p>
<table border="1" cellspacing="0" cellpadding="5">

<tr>
<td colspan='9' class='MacroType'>Host Macros: <a href="#note3"><sup>3</sup></a></td>
</tr>

<tr>
<a name="hostname"></a>
<td class="MacroName">$HOSTNAME$</td>
<td class="MacroDescription">Short name for the host (i.e. "biglinuxbox").  This value is taken from the <i>host_name</i> directive in the <a href="xodtemplate.html#host">host definition</a>.</td>
</tr>

<tr>
<a name="hostalias"></a>
<td class="MacroName">$HOSTALIAS$</td>
<td class="MacroDescription">Long name/description for the host.  This value is taken from the <i>alias</i> directive in the <a href="xodtemplate.html#host">host definition</a>.</td>
</tr>

<tr>
<a name="hostaddress"></a>
<td class="MacroName">$HOSTADDRESS$</td>
<td class="MacroDescription">Address of the host.  This value is taken from the <i>address</i> directive in the <a href="xodtemplate.html#host">host definition</a>.</td>
</tr>

<tr>
<a name="hoststate"></a>
<td class="MacroName">$HOSTSTATE$</td>
<td class="MacroDescription">A string indicating the current state of the host ("UP", "DOWN", or "UNREACHABLE").</td>
</tr>

<tr>
<a name="hoststateid"></a>
<td class="MacroName">$HOSTSTATEID$</td>
<td class="MacroDescription">A number that corresponds to the current state of the host: 0=UP, 1=DOWN, 2=UNREACHABLE.</td>
</tr>

<tr>
<a name="hoststatetype"></a>
<td class="MacroName">$HOSTSTATETYPE$</td>
<td class="MacroDescription">A string indicating the <a href="statetypes.html">state type</a> for the current host check ("HARD" or "SOFT"). Soft states occur when host checks return a non-OK (non-UP) state and are in the process of being retried. Hard states result when host checks have been checked a specified maximum number of times.</td>
</tr>

<tr>
<a name="hostattempt"></a>
<td class="MacroName">$HOSTATTEMPT$</td>
<td class="MacroDescription">The number of the current host check retry. For instance, if this is the second time that the host is being rechecked, this will be the number two.  Current attempt number is really only useful when writing host event handlers for "soft" states that take a specific action based on the host retry number.</td>
</tr>

<tr>
<a name="hostlatency"></a>
<td class="MacroName">$HOSTLATENCY$</td>
<td class="MacroDescription">A (floating point) number indicating the number of seconds that a <i>scheduled</i> host check lagged behind its scheduled check time. For instance, if a check was scheduled for 03:14:15 and it didn't get executed until 03:14:17, there would be a check latency of 2.0 seconds.  On-demand host checks have a latency of zero seconds.</td>
</tr>

<tr>
<a name="hostexecutiontime"></a>
<td class="MacroName">$HOSTEXECUTIONTIME$</td>
<td class="MacroDescription">A (floating point) number indicating the number of seconds that the host check took to execute (i.e. the amount of time the check was executing).</td>
</tr>

<tr>
<a name="hostduration"></a>
<td class="MacroName">$HOSTDURATION$</td>
<td class="MacroDescription">A string indicating the amount of time that the host has spent in its current state.  Format is "XXh YYm ZZs", indicating hours, minutes and seconds.</td>
</tr>

<tr>
<a name="hostdurationsec"></a>
<td class="MacroName">$HOSTDURATIONSEC$</td>
<td class="MacroDescription">A number indicating the number of seconds that the host has spent in its current state.</td>
</tr>

<tr>
<a name="hostdowntime"></a>
<td class="MacroName">$HOSTDOWNTIME$</td>
<td class="MacroDescription">A number indicating the current "downtime depth" for the host.  If this host is currently in a period of <a href="downtime.html">scheduled downtime</a>, the value will be greater than zero.  If the host is not currently in a period of downtime, this value will be zero.</td>
</tr>

<tr>
<a name="hostpercentchange"></a>
<td class="MacroName">$HOSTPERCENTCHANGE$</td>
<td class="MacroDescription">A (floating point) number indicating the percent state change the host has undergone.  Percent state change is used by the <a href="flapping.html">flap detection</a> algorithm.</td>
</tr>

<tr>
<a name="hostgroupname"></a>
<td class="MacroName">$HOSTGROUPNAME$</td>
<td class="MacroDescription">The short name of the hostgroup that this host belongs to.  This value is taken from the <i>hostgroup_name</i> directive in the <a href="xodtemplate.html#hostgroup">hostgroup definition</a>.  If the host belongs to more than one hostgroup this macro will contain the name of just one of them.</td>
</tr>

<tr>
<a name="hostgroupalias"></a>
<td class="MacroName">$HOSTGROUPALIAS$</td>
<td class="MacroDescription">The longer name/alias of the hostgroup that this host belongs to.  This value is taken from the <i>alias</i> directive in the <a href="xodtemplate.html#hostgroup">hostgroup definition</a>.  If the host belongs to more than one hostgroup, this macro contains the alias of just one of them.</td>
</tr>

<tr>
<a name="lasthostcheck"></a>
<td class="MacroName">$LASTHOSTCHECK$</td>
<td class="MacroDescription">This is a timestamp in time_t format (seconds since the UNIX epoch) indicating the time at which a check of the host was last performed.</td>
</tr>

<tr>
<a name="lasthoststatechange"></a>
<td class="MacroName">$LASTHOSTSTATECHANGE$</td>
<td class="MacroDescription">This is a timestamp in time_t format (seconds since the UNIX epoch) indicating the time the host last changed state.</td>
</tr>

<tr>
<a name="lasthostup"></a>
<td class="MacroName">$LASTHOSTUP$</td>
<td class="MacroDescription">This is a timestamp in time_t format (seconds since the UNIX epoch) indicating the time at which the host was last detected as being in an UP state.</td>
</tr>

<tr>
<a name="lasthostdown"></a>
<td class="MacroName">$LASTHOSTDOWN$</td>
<td class="MacroDescription">This is a timestamp in time_t format (seconds since the UNIX epoch) indicating the time at which the host was last detected as being in a DOWN state.</td>
</tr>

<tr>
<a name="lasthostunreachable"></a>
<td class="MacroName">$LASTHOSTUNREACHABLE$</td>
<td class="MacroDescription">This is a timestamp in time_t format (seconds since the UNIX epoch) indicating the time at which the host was last detected as being in an UNREACHABLE state.</td>
</tr>

<tr>
<a name="hostoutput"></a>
<td class="MacroName">$HOSTOUTPUT$</td>
<td class="MacroDescription">The text output from the last host check (i.e. "Ping OK").</td>
</tr>

<tr>
<a name="hostperfdata"></a>
<td class="MacroName">$HOSTPERFDATA$</td>
<td class="MacroDescription">This macro contains any <a href="perfdata.html">performance data</a> that may have been returned by the last host check.</td>
</tr>

<tr>
<a name="hostcheckcommand"></a>
<td class="MacroName">$HOSTCHECKCOMMAND$</td>
<td class="MacroDescription">This macro contains the name of the command (along with any arguments passed to it) used to perform the host check.</td>
</tr>

<tr>
<a name="hostackauthor"></a>
<td class="MacroName">$HOSTACKAUTHOR$</td>
<td class="MacroDescription">A string containing the name of the user who acknowledged the host problem.  This macro is only valid in notifications where the $NOTIFICATIONTYPE$ macro is set to "ACKNOWLEDGEMENT".</td>
</tr>

<tr>
<a name="hostackcomment"></a>
<td class="MacroName">$HOSTACKCOMMENT$</td>
<td class="MacroDescription">A string containing the acknowledgement comment that was entered by the user who acknowledged the host problem.  This macro is only valid in notifications where the $NOTIFICATIONTYPE$ macro is set to "ACKNOWLEDGEMENT".</td>
</tr>

<tr>
<a name="hostactionurl"></a>
<td class="MacroName">$HOSTACTIONURL$</td>
<td class="MacroDescription">Action URL for the host.  This value is taken from the <i>action_url</i> directive in the <a href="xodtemplate.html#hostextinfo">extended host information definition</a>.</td>
</tr>

<tr>
<a name="hostnotesurl"></a>
<td class="MacroName">$HOSTNOTESURL$</td>
<td class="MacroDescription">Notes URL for the host.  This value is taken from the <i>notes_url</i> directive in the <a href="xodtemplate.html#hostextinfo">extended host information definition</a>.</td>
</tr>

<tr>
<a name="hostnotes"></a>
<td class="MacroName">$HOSTNOTES$</td>
<td class="MacroDescription">Notes for the host.  This value is taken from the <i>notes</i> directive in the <a href="xodtemplate.html#hostextinfo">extended host information definition</a>.</td>
</tr>

<tr>
<td colspan='9' class='MacroType'>Service Macros:</td>
</tr>

<tr>
<a name="servicedesc"></a>
<td class="MacroName">$SERVICEDESC$</td>
<td class="MacroDescription">The long name/description of the service (i.e. "Main Website").  This value is taken from the <i>description</i> directive of the <a href="xodtemplate.html#service">service definition</a>.</td>
</tr>

<tr>
<a name="servicestate"></a>
<td class="MacroName">$SERVICESTATE$</td>
<td class="MacroDescription">A string indicating the current state of the service ("OK", "WARNING", "UNKNOWN", or "CRITICAL").</td>
</tr>

<tr>
<a name="servicestateid"></a>
<td class="MacroName">$SERVICESTATEID$</td>
<td class="MacroDescription">A number that corresponds to the current state of the service: 0=OK, 1=WARNING, 2=CRITICAL, 3=UNKNOWN.</td>
</tr>

<tr>
<a name="servicestatetype"></a>
<td class="MacroName">$SERVICESTATETYPE$</td>
<td class="MacroDescription">A string indicating the <a href="statetypes.html">state type</a> for the current service check ("HARD" or "SOFT"). Soft states occur when service checks return a non-OK state and are in the process of being retried. Hard states result when service checks have been checked a specified maximum number of times.</td>
</tr>

<tr>
<a name="serviceattempt"></a>
<td class="MacroName">$SERVICEATTEMPT$</td>
<td class="MacroDescription">The number of the current service check retry. For instance, if this is the second time that the service is being rechecked, this will be the number two. Current attempt number is really only useful when writing service event handlers for "soft" states that take a specific action based on the service retry number.</td>
</tr>

<tr>
<a name="servicelatency"></a>
<td class="MacroName">$SERVICELATENCY$</td>
<td class="MacroDescription">A (floating point) number indicating the number of seconds that a scheduled service check lagged behind its scheduled check time. For instance, if a check was scheduled for 03:14:15 and it didn't get executed until 03:14:17, there would be a check latency of 2.0 seconds.</td>
</tr>

<tr>
<a name="serviceexecutiontime"></a>
<td class="MacroName">$SERVICEEXECUTIONTIME$</td>
<td class="MacroDescription">A (floating point) number indicating the number of seconds that the service check took to execute (i.e. the amount of time the check was executing).</td>
</tr>

<tr>
<a name="serviceduration"></a>
<td class="MacroName">$SERVICEDURATION$</td>
<td class="MacroDescription">A string indicating the amount of time that the service has spent in its current state. Format is "XXh YYm ZZs", indicating hours, minutes and seconds.</td>
</tr>

<tr>
<a name="servicedurationsec"></a>
<td class="MacroName">$SERVICEDURATIONSEC$</td>
<td class="MacroDescription">A number indicating the number of seconds that the service has spent in its current state.</td>
</tr>

<tr>
<a name="servicedowntime"></a>
<td class="MacroName">$SERVICEDOWNTIME$</td>
<td class="MacroDescription">A number indicating the current "downtime depth" for the service. If this service is currently in a period of <a href="downtime.html">scheduled downtime</a>, the value will be greater than zero. If the service is not currently in a period of downtime, this value will be zero.</td>
</tr>

<tr>
<a name="servicepercentchange"></a>
<td class="MacroName">$SERVICEPERCENTCHANGE$</td>
<td class="MacroDescription">A (floating point) number indicating the percent state change the service has undergone. Percent state change is used by the <a href="flapping.html">flap detection</a> algorithm.</td>
</tr>

<tr>
<a name="servicegroupname"></a>
<td class="MacroName">$SERVICEGROUPNAME$</td>
<td class="MacroDescription">The short name of the servicegroup that this service belongs to. This value is taken from the <i>servicegroup_name</i> directive in the <a href="xodtemplate.html#servicegroup">servicegroup</a> definition. If the service belongs to more than one servicegroup this macro will contain the name of just one of them.</td>
</tr>

<tr>
<a name="servicegroupalias"></a>
<td class="MacroName">$SERVICEGROUPALIAS$</td>
<td class="MacroDescription">The long name/alias of the servicegroup that this service belongs to. This value is taken from the <i>alias</i> directive in the <a href="xodtemplate.html#servicegroup">servicegroup</a> definition. If the service belongs to more than one servicegroup this macro will contain the name of just one of them.</td>
</tr>

<tr>
<a name="lastservicecheck"></a>
<td class="MacroName">$LASTSERVICECHECK$</td>
<td class="MacroDescription">This is a timestamp in time_t format (seconds since the UNIX epoch) indicating the time at which a check of the service was last performed.</td>
</tr>

<tr>
<a name="lastservicestatechange"></a>
<td class="MacroName">$LASTSERVICESTATECHANGE$</td>
<td class="MacroDescription">This is a timestamp in time_t format (seconds since the UNIX epoch) indicating the time the service last changed state.</td>
</tr>

<tr>
<a name="lastserviceok"></a>
<td class="MacroName">$LASTSERVICEOK$</td>
<td class="MacroDescription">This is a timestamp in time_t format (seconds since the UNIX epoch) indicating the time at which the service was last detected as being in an OK state.</td>
</tr>

<tr>
<a name="lastservicewarning"></a>
<td class="MacroName">$LASTSERVICEWARNING$</td>
<td class="MacroDescription">This is a timestamp in time_t format (seconds since the UNIX epoch) indicating the time at which the service was last detected as being in a WARNING state.</td>
</tr>

<tr>
<a name="lastserviceunknown"></a>
<td class="MacroName">$LASTSERVICEUNKNOWN$</td>
<td class="MacroDescription">This is a timestamp in time_t format (seconds since the UNIX epoch) indicating the time at which the service was last detected as being in an UNKNOWN state.</td>
</tr>

<tr>
<a name="lastservicecritical"></a>
<td class="MacroName">$LASTSERVICECRITICAL$</td>
<td class="MacroDescription">This is a timestamp in time_t format (seconds since the UNIX epoch) indicating the time at which the service was last detected as being in a CRITICAL state.</td>
</tr>

<tr>
<a name="serviceoutput"></a>
<td class="MacroName">$SERVICEOUTPUT$</td>
<td class="MacroDescription">The text output from the last service check (i.e. "Ping OK").</td>
</tr>

<tr>
<a name="serviceperfdata"></a>
<td class="MacroName">$SERVICEPERFDATA$</td>
<td class="MacroDescription">This macro contains any <a href="perfdata.html">performance data</a> that may have been returned by the last service check.</td>
</tr>

<tr>
<a name="servicecheckcommand"></a>
<td class="MacroName">$SERVICECHECKCOMMAND$</td>
<td class="MacroDescription">This macro contains the name of the command (along with any arguments passed to it) used to perform the service check.</td>
</tr>

<tr>
<a name="serviceackauthor"></a>
<td class="MacroName">$SERVICEACKAUTHOR$</td>
<td class="MacroDescription">A string containing the name of the user who acknowledged the service problem. This macro is only valid in notifications where the $NOTIFICATIONTYPE$ macro is set to "ACKNOWLEDGEMENT".</td>
</tr>

<tr>
<a name="serviceackcomment"></a>
<td class="MacroName">$SERVICEACKCOMMENT$</td>
<td class="MacroDescription">A string containing the acknowledgement comment that was entered by the user who acknowledged the service problem. This macro is only valid in notifications where the $NOTIFICATIONTYPE$ macro is set to "ACKNOWLEDGEMENT".</td>
</tr>

<tr>
<a name="serviceactionurl"></a>
<td class="MacroName">$SERVICEACTIONURL$</td>
<td class="MacroDescription">Action URL for the service.  This value is taken from the <i>action_url</i> directive in the <a href="xodtemplate.html#serviceextinfo">extended service information definition</a>.</td>
</tr>

<tr>
<a name="servicenotesurl"></a>
<td class="MacroName">$SERVICENOTESURL$</td>
<td class="MacroDescription">Notes URL for the service.  This value is taken from the <i>notes_url</i> directive in the <a href="xodtemplate.html#serviceextinfo">extended service information definition</a>.</td>
</tr>

<tr>
<a name="servicenotes"></a>
<td class="MacroName">$SERVICENOTES$</td>
<td class="MacroDescription">Notes for the service.  This value is taken from the <i>notes</i> directive in the <a href="xodtemplate.html#serviceextinfo">extended service information definition</a>.</td>
</tr>

<tr>
<td colspan='9' class='MacroType'>Notification Macros:</td>
</tr>

<tr>
<a name="notificationtype"></a>
<td class="MacroName">$NOTIFICATIONTYPE$</td>
<td class="MacroDescription">A string identifying the type of notification that is being sent ("PROBLEM", "RECOVERY", "ACKNOWLEDGEMENT", "FLAPPINGSTART" or "FLAPPINGSTOP").</td>
</tr>

<tr>
<a name="notificationnumber"></a>
<td class="MacroName">$NOTIFICATIONNUMBER$</td>
<td class="MacroDescription">The current notification number for the service or host.  The notification number increases by one (1) each time a new notification is sent out for a host or service (except for acknowledgements).  The notification number is reset to 0 when the host or service recovers (<i>after</i> the recovery notification has gone out).  Acknowledgements do not cause the notification number to increase.</td>
</tr>

<tr>
<td colspan='9' class='MacroType'>SUMMARY Macros:</td>
</tr>

<tr>
<a name="totalhostsup"></a>
<td class="MacroName">$TOTALHOSTSUP$</td>
<td class="MacroDescription">This macro reflects the total number of hosts that are currently in an UP state.</td>
</tr>

<tr>
<a name="totalhostsdown"></a>
<td class="MacroName">$TOTALHOSTSDOWN$</td>
<td class="MacroDescription">This macro reflects the total number of hosts that are currently in a DOWN state.</td>
</tr>

<tr>
<a name="totalhostsunreachable"></a>
<td class="MacroName">$TOTALHOSTSUNREACHABLE$</td>
<td class="MacroDescription">This macro reflects the total number of hosts that are currently in an UNREACHABLE state.</td>
</tr>

<tr>
<a name="totalhostsdownunhandled"></a>
<td class="MacroName">$TOTALHOSTSDOWNUNHANDLED$</td>
<td class="MacroDescription">This macro reflects the total number of hosts that are currently in a DOWN state that are not currently being "handled".  Unhandled host problems are those that are not acknowledged, are not currently in scheduled downtime, and for which checks are currently enabled.</td>
</tr>

<tr>
<a name="totalhostsunreachableunhandled"></a>
<td class="MacroName">$TOTALHOSTSUNREACHABLEUNHANDLED$</td>
<td class="MacroDescription">This macro reflects the total number of hosts that are currently in an UNREACHABLE state that are not currently being "handled".  Unhandled host problems are those that are not acknowledged, are not currently in scheduled downtime, and for which checks are currently enabled.</td>
</tr>

<tr>
<a name="totalhostproblems"></a>
<td class="MacroName">$TOTALHOSTPROBLEMS$</td>
<td class="MacroDescription">This macro reflects the total number of hosts that are currently either in a DOWN or an UNREACHABLE state.</td>
</tr>

<tr>
<a name="totalhostproblemsunhandled"></a>
<td class="MacroName">$TOTALHOSTPROBLEMSUNHANDLED$</td>
<td class="MacroDescription">This macro reflects the total number of hosts that are currently either in a DOWN or an UNREACHABLE state that are not currently being "handled".  Unhandled host problems are those that are not acknowledged, are not currently in scheduled downtime, and for which checks are currently enabled.</td>
</tr>

<tr>
<a name="totalservicesok"></a>
<td class="MacroName">$TOTALSERVICESOK$</td>
<td class="MacroDescription">This macro reflects the total number of services that are currently in an OK state.</td>
</tr>

<tr>
<a name="totalserviceswarning"></a>
<td class="MacroName">$TOTALSERVICESWARNING$</td>
<td class="MacroDescription">This macro reflects the total number of services that are currently in a WARNING state.</td>
</tr>

<tr>
<a name="totalservicescritical"></a>
<td class="MacroName">$TOTALSERVICESCRITICAL$</td>
<td class="MacroDescription">This macro reflects the total number of services that are currently in a CRITICAL state.</td>
</tr>

<tr>
<a name="totalservicesunknown"></a>
<td class="MacroName">$TOTALSERVICESUNKNOWN$</td>
<td class="MacroDescription">This macro reflects the total number of services that are currently in an UNKNOWN state.</td>
</tr>

<tr>
<a name="totalserviceswarningunhandled"></a>
<td class="MacroName">$TOTALSERVICESWARNINGUNHANDLED$</td>
<td class="MacroDescription">This macro reflects the total number of services that are currently in a WARNING state that are not currently being "handled".  Unhandled services problems are those that are not acknowledged, are not currently in scheduled downtime, and for which checks are currently enabled.</td>
</tr>

<tr>
<a name="totalservicescriticalunhandled"></a>
<td class="MacroName">$TOTALSERVICESCRITICALUNHANDLED$</td>
<td class="MacroDescription">This macro reflects the total number of services that are currently in a CRITICAL state that are not currently being "handled".  Unhandled services problems are those that are not acknowledged, are not currently in scheduled downtime, and for which checks are currently enabled.</td>
</tr>

<tr>
<a name="totalservicesunknownunhandled"></a>
<td class="MacroName">$TOTALSERVICESUNKNOWNUNHANDLED$</td>
<td class="MacroDescription">This macro reflects the total number of services that are currently in an UNKNOWN state that are not currently being "handled".  Unhandled services problems are those that are not acknowledged, are not currently in scheduled downtime, and for which checks are currently enabled.</td>
</tr>

<tr>
<a name="totalserviceproblems"></a>
<td class="MacroName">$TOTALSERVICEPROBLEMS$</td>
<td class="MacroDescription">This macro reflects the total number of services that are currently either in a WARNING, CRITICAL, or UNKNOWN state.</td>
</tr>

<tr>
<a name="totalserviceproblemsunhandled"></a>
<td class="MacroName">$TOTALSERVICEPROBLEMSUNHANDLED$</td>
<td class="MacroDescription">This macro reflects the total number of services that are currently either in a WARNING, CRITICAL, or UNKNOWN state that are not currently being "handled".  Unhandled services problems are those that are not acknowledged, are not currently in scheduled downtime, and for which checks are currently enabled.</td>
</tr>

<tr>
<td colspan='9' class='MacroType'>Contact Macros:</td>
</tr>

<tr>
<a name="contactname"></a>
<td class="MacroName">$CONTACTNAME$</td>
<td class="MacroDescription">Short name for the contact (i.e. "jdoe") that is being notified of a host or service problem.  This value is taken from the <i>contact_name</i> directive in the <a href="xodtemplate.html#contact">contact definition</a>.</td>
</tr>

<tr>
<a name="contactalias"></a>
<td class="MacroName">$CONTACTALIAS$</td>
<td class="MacroDescription">Long name/description for the contact (i.e. "John Doe") being notified.  This value is taken from the <i>alias</i> directive in the <a href="xodtemplate.html#contact">contact definition</a>.</td></tr>

<tr>
<a name="contactemail"></a>
<td class="MacroName">$CONTACTEMAIL$</td>
<td class="MacroDescription">Email address of the contact being notified.  This value is taken from the <i>email</i> directive in the <a href="xodtemplate.html#contact">contact definition</a>.</td>
</tr>

<tr>
<a name="contactpager"></a>
<td class="MacroName">$CONTACTPAGER$</td>
<td class="MacroDescription">Pager number/address of the contact being notified.  This value is taken from the <i>pager</i> directive in the <a href="xodtemplate.html#contact">contact definition</a>.</td>
</tr>

<tr>
<a name="contactaddress"></a>
<td class="MacroName">$CONTACTADDRESSn$</td>
<td class="MacroDescription">Address of the contact being notified.  Each contact can have six different addresses (in addition to email address and pager number).  The macros for these addresses are $CONTACTADDRESS1$ - $CONTACTADDRESS6$.  This value is taken from the <i>addressx</i> directive in the <a href="xodtemplate.html#contact">contact definition</a>.</td>
</tr>

<tr>
<td colspan='9' class='MacroType'>Date Macros:</td>
</tr>

<tr>
<a name="longdatetime"></a>
<td class="MacroName">$LONGDATETIME$</td>
<td class="MacroDescription">Current date/time stamp (i.e. <i>Fri Oct 13 00:30:28 CDT 2000</i>).  Format of date is determined by <a href="configmain.html#date_format">date_format</a> directive.</td>
</tr>

<tr>
<a name="shortdatetime"></a>
<td class="MacroName">$SHORTDATETIME$</td>
<td class="MacroDescription">Current date/time stamp (i.e. <i>10-13-2000 00:30:28</i>).  Format of date is determined by <a href="configmain.html#date_format">date_format</a> directive.</td>
</tr>

<tr>
<a name="date"></a>
<td class="MacroName">$DATE$</td>
<td class="MacroDescription">Date stamp (i.e. <i>10-13-2000</i>).  Format of date is determined by <a href="configmain.html#date_format">date_format</a> directive.</td>
</tr>

<tr>
<a name="time"></a>
<td class="MacroName">$TIME$</td>
<td class="MacroDescription">Current time stamp (i.e. <i>00:30:28</i>).</td>
</tr>

<tr>
<a name="timet"></a>
<td class="MacroName">$TIMET$</td>
<td class="MacroDescription">Current time stamp in time_t format (seconds since the UNIX epoch).</td>
</tr>

<tr>
<td colspan='9' class='MacroType'>File Macros:</td>
</tr>

<tr>
<a name="mainconfigfile"></a>
<td class="MacroName">$MAINCONFIGFILE$</td>
<td class="MacroDescription">The location of the <a href="configmain.html">main config file</a>.</td>
</tr>

<tr>
<a name="statusdatafile"></a>
<td class="MacroName">$STATUSDATAFILE$</td>
<td class="MacroDescription">The location of the <a href="configmain.html#status_file">status data file</a>.</td>
</tr>

<tr>
<a name="commentdatafile"></a>
<td class="MacroName">$COMMENTDATAFILE$</td>
<td class="MacroDescription">The location of the comment data file.</td>
</tr>

<tr>
<a name="downtimedatafile"></a>
<td class="MacroName">$DOWNTIMEDATAFILE$</td>
<td class="MacroDescription">The location of the downtime data file.</td>
</tr>

<tr>
<a name="retentiondatafile"></a>
<td class="MacroName">$RETENTIONDATAFILE$</td>
<td class="MacroDescription">The location of the <a href="configmain.html#state_retention_file">retention data file</a>.</td>
</tr>

<tr>
<a name="objectcachefile"></a>
<td class="MacroName">$OBJECTCACHEFILE$</td>
<td class="MacroDescription">The location of the <a href="configmain.html#object_cache_file">object cache file</a>.</td>
</tr>

<tr>
<a name="tempfile"></a>
<td class="MacroName">$TEMPFILE$</td>
<td class="MacroDescription">The location of the <a href="configmain.html#temp_file">temp file</a>.</td>
</tr>

<tr>
<a name="logfile"></a>
<td class="MacroName">$LOGFILE$</td>
<td class="MacroDescription">The location of the <a href="configmain.html#log_file">log file</a>.</td>
</tr>

<tr>
<a name="resourcefile"></a>
<td class="MacroName">$RESOURCEFILE$</td>
<td class="MacroDescription">The location of the <a href="configmain.html#resource_file">resource file</a>.</td>
</tr>

<tr>
<a name="commandfile"></a>
<td class="MacroName">$COMMANDFILE$</td>
<td class="MacroDescription">The location of the <a href="configmain.html#command_file">command file</a>.</td>
</tr>

<tr>
<a name="hostperfdatafile"></a>
<td class="MacroName">$HOSTPERFDATAFILE$</td>
<td class="MacroDescription">The location of the host performance data file (if defined).</td>
</tr>

<tr>
<a name="serviceperfdatafile"></a>
<td class="MacroName">$SERVICEPERFDATAFILE$</td>
<td class="MacroDescription">The location of the service performance data file (if defined).</td>
</tr>

<tr>
<td colspan='9' class='MacroType'>Misc Macros:</td>
</tr>

<tr>
<a name="processstarttime"></a>
<td class="MacroName">$PROCESSSTARTTIME$</td>
<td class="MacroDescription">Time stamp in time_t format (seconds since the UNIX epoch) indicating when the Nagios process was last (re)started.  You can determine the number of seconds that Nagios has been running (since it was last restarted) by subtracting $PROCESSSTARTTIME$ from <a href="#timet">$TIMET$</a>.</td>
</tr>

<tr>
<a name="adminemail"></a>
<td class="MacroName">$ADMINEMAIL$</td>
<td class="MacroDescription">Global administrative email address.  This value is taken from the <a href="configmain.html#admin_email">admin_email</a> directive.</td>
</tr>

<tr>
<a name="adminpager"></a>
<td class="MacroName">$ADMINPAGER$</td>
<td class="MacroDescription">Global administrative pager number/address.  This value is taken from the <a href="configmain.html#admin_pager">admin_pager</a> directive.</td>
</tr>

<tr>
<a name="arg"></a>
<td class="MacroName">$ARGn$</td>
<td class="MacroDescription">The <i>n</i>th argument passed to the command (notification, event handler, service check, etc.). Nagios supports up to 32 argument macros ($ARG1$ through $ARG32$).</td>
</tr>

<tr>
<a name="user"></a>
<td class="MacroName">$USERn$</td>
<td class="MacroDescription">The <i>n</i>th user-definable macro. User macros can be defined in one or more <a href="configmain.html#resource_file">resource files</a>. Nagios supports up to 32 user macros ($USER1$ through $USER32$).</td>
</tr>

</table>
</p>


<p>
<strong><u>Notes</u></strong>
</p>

<a name="note1"></a>
<p>
<sup><b>1</b></sup>  These macros are not valid for the host they are associated with when that host is being checked (i.e. they make no sense, as they haven't been determined yet).
</p>

<a name="note2"></a>
<p>
<sup><b>2</b></sup>  These macros are not valid for the service they are associated with when that service is being checked (i.e. they make no sense, as they haven't been determined yet).
</p>

<a name="note3"></a>
<p>
<sup><b>3</b></sup>  When host macros are used in service-related commands (i.e. service notifications, event handlers, etc) they refer to they host that they service is associated with.
</p>

<a name="note4"></a>
<p>
<sup><b>4</b></sup>  When host and service summary macros are used in notification commands, the totals are filtered to reflect only those hosts and services for which the contact is authorized (i.e. hosts and services they are configured to receive notifications for).
</p>

<hr>

</body>
</html>
